package thirdassigment;

public class Exit implements ICommandExecutor{
	private static ICommandExecutor instance;
	@Override
	public void execute (String enterstr){
		System.exit(0);
	}
	private Exit(){
	}
	public static ICommandExecutor getInstance() {
	    if(instance==null){
	            instance=new Exit();       
	            }
	    return instance;
	}
}
